package com.heima.utils.thread;

import com.heima.model.wemedia.pojos.WmUser;

/**
 * @ClassName WmThreadLocalUtils
 * @Description TODO
 * @Author 云天流
 * @Date 2022/4/9 18:37
 * @Version 1.0
 **/
public class WmThreadLocalUtils {
    private  final  static ThreadLocal<WmUser> WM_USER_THREAD_LOCAL=new ThreadLocal<>();
    //存入线程中
    public  static  void setUser(WmUser wmUser){
        WM_USER_THREAD_LOCAL.set(wmUser);
    }
    //从线程中获取
    public static   WmUser getUser(){
        return  WM_USER_THREAD_LOCAL.get();
    }
    //清理
    public static  void  clear(){
        WM_USER_THREAD_LOCAL.remove();
    }







}
